package com.mangrove;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class ApplicationManager {
	
	public static void exitApplication(Context ctx){
		AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
		builder.setMessage(R.string.exitDialog_title).setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener(){			
			public void onClick(DialogInterface dialog, int which) {
				System.exit(0);
			}
		}).setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
			
			public void onClick(DialogInterface dialog, int which) {
				dialog.cancel();
			}
		});
		AlertDialog alert = builder.create();
		alert.show();
	}

}
